import { PriceResizeListProps } from "@/api/drawing/types"
import DelPng from "@/assets/drawing/del.png"
import DownloadPng from "@/assets/drawing/download.png"
import SubmitPng from "@/assets/drawing/submit.png"
import UpPng from "@/assets/drawing/up.png"

export type ModelType = "base" | "cartoon"

export interface DrawingFormProps {
  command: string
  cmd_proportion: string
  cmd_auxiliary: string
  cmd_style: string
  model: ModelType
}

export interface DrawingDataProps {
  id: number
  messages_id?: string
  cos_url: string
  is_button: string
  status: string
  cmd_proportion: string
  command_base?: string
  progress?: number
  is_buttons?: string
}

export const ImageButtonList: { button: string }[] = [
  {
    button: "U1"
  },
  {
    button: "U2"
  },
  {
    button: "U3"
  },
  {
    button: "U4"
  },
  {
    button: "V1"
  },
  {
    button: "V2"
  },
  {
    button: "V3"
  },
  {
    button: "V4"
  }
]

export interface VocabularyOptionsProps {
  label: string
  value: string
  options?: VocabularyOptionsProps[]
}

export const priceResizeList: PriceResizeListProps[] = [
  {
    id: 1,
    scale: "1:1",
    width: "30",
    height: "30"
  },
  {
    id: 2,
    scale: "2:1",
    width: "40",
    height: "20"
  },
  {
    id: 3,
    scale: "1:2",
    width: "15",
    height: "30"
  },
  {
    id: 4,
    scale: "4:3",
    width: "40",
    height: "30"
  },
  {
    id: 5,
    scale: "9:16",
    width: "17",
    height: "30"
  },
  {
    id: 6,
    scale: "16:9",
    width: "30",
    height: "20"
  }
]

export const mediumOptions: VocabularyOptionsProps[] = [
  {
    label: "插画",
    value: "插画"
  },
  {
    label: "向量图",
    value: "向量图"
  },
  {
    label: "摄影",
    value: "摄影"
  },
  {
    label: "水彩",
    value: "水彩"
  },
  {
    label: "素描",
    value: "素描"
  },
  {
    label: "雕塑",
    value: "雕塑"
  },
  {
    label: "水墨画",
    value: "水墨画"
  },
  {
    label: "印刷版画",
    value: "印刷版画"
  },
  {
    label: "利诺剪裁",
    value: "利诺剪裁"
  },
  {
    label: "手稿",
    value: "手稿"
  }
]

export const sceneOptions: VocabularyOptionsProps[] = [
  {
    label: "反乌托邦",
    value: "反乌托邦"
  },
  {
    label: "幻想",
    value: "幻想"
  },
  {
    label: "教室",
    value: "教室"
  },
  {
    label: "异想天开",
    value: "想天开"
  },
  {
    label: "卧室",
    value: "卧室"
  },
  {
    label: "森林",
    value: "森林"
  },
  {
    label: "城市",
    value: "城市"
  },
  {
    label: "废弃城市建筑群",
    value: "废弃城市建筑群"
  },
  {
    label: "近未来都市",
    value: "近未来都市"
  },
  {
    label: "街景",
    value: "街景"
  },
  {
    label: "天空之城",
    value: "天空之城"
  },
  {
    label: "宇宙",
    value: "宇宙"
  },
  {
    label: "雨天",
    value: "雨天"
  },
  {
    label: "在晨雾中",
    value: "在晨雾中"
  },
  {
    label: "充满阳光",
    value: "充满阳光"
  },
  {
    label: "草原草地",
    value: "草原草地"
  },
  {
    label: "杂草丛生",
    value: "杂草丛生"
  },
  {
    label: "黑暗地牢",
    value: "黑暗地牢"
  },
  {
    label: "星云",
    value: "星云"
  },
  {
    label: "后启示录、末日后",
    value: "后启示录、末日后"
  },
  {
    label: "银河",
    value: "银河"
  },
  {
    label: "废墟",
    value: "废墟"
  }
]

export const hvOptions: VocabularyOptionsProps[] = [
  {
    label: "强光",
    value: "强光"
  },
  {
    label: "体积照明",
    value: "体积照明"
  },
  {
    label: "情绪照明",
    value: "情绪照明"
  },
  {
    label: "明亮的",
    value: "明亮的"
  },
  {
    label: "柔光",
    value: "柔光"
  },
  {
    label: "荧光灯",
    value: "荧光灯"
  },
  {
    label: "微光/晨光",
    value: "微光/晨光"
  },
  {
    label: "黄昏射线",
    value: "黄昏射线"
  },
  {
    label: "外太空",
    value: "外太空"
  },
  {
    label: "冷光",
    value: "冷光"
  },
  {
    label: "外太空观",
    value: "外太空观"
  },
  {
    label: "柔软的光线",
    value: "柔软的光线"
  },
  {
    label: "电影光",
    value: "电影光"
  },
  {
    label: "影棚光",
    value: "影棚光"
  },
  {
    label: "自然光",
    value: "自然光"
  },
  {
    label: "侧光",
    value: "侧光"
  },
  {
    label: "边缘光",
    value: "边缘光"
  },
  {
    label: "逆光",
    value: "逆光"
  },
  {
    label: "硬光",
    value: "硬光"
  },
  {
    label: "正面光照",
    value: "正面光照"
  },
  {
    label: "背光",
    value: "背光"
  },
  {
    label: "侧面光照",
    value: "侧面光照"
  },
  {
    label: "顶部光照",
    value: "顶部光照"
  },
  {
    label: "电影/戏剧灯光",
    value: "电影/戏剧灯光"
  },
  {
    label: "双性照明",
    value: "双性照明"
  },
  {
    label: "伦勃朗照明",
    value: "伦勃朗照明"
  },
  {
    label: "分体照明",
    value: "分体照明"
  },
  {
    label: "边缘灯",
    value: "边缘灯"
  },
  {
    label: "全局照明",
    value: "全局照明"
  },
  {
    label: "霓虹灯冷光",
    value: "霓虹灯冷光"
  },
  {
    label: "太阳光",
    value: "太阳光"
  }
]

export const constructsOptions: VocabularyOptionsProps[] = [
  {
    label: "轴侧图/2.5D透视",
    value: "轴侧图/2.5D透视"
  },
  {
    label: "鸟瞰图",
    value: "鸟瞰图"
  },
  {
    label: "顶视图",
    value: "顶视图"
  },
  {
    label: "居中构图",
    value: "居中构图"
  },
  {
    label: "背景虚化",
    value: "背景虚化"
  },
  {
    label: "面部拍摄(VCU)",
    value: "面部拍摄(VCU)"
  },
  {
    label: "两点透视",
    value: "两点透视"
  },
  {
    label: "倾斜移位",
    value: "倾斜移位"
  },
  {
    label: "卫星视图",
    value: "卫星视图"
  },
  {
    label: "立面透视",
    value: "立面透视"
  },
  {
    label: "产品视图",
    value: "产品视图"
  },
  {
    label: "极端特写视图",
    value: "极端特写视图"
  },
  {
    label: "第一人称视角",
    value: "第一人称视角"
  },
  {
    label: "等距视图",
    value: "等距视图"
  },
  {
    label: "特写视图",
    value: "特写视图"
  },
  {
    label: "高角度视图",
    value: "高角度视图"
  },
  {
    label: "微观",
    value: "微观"
  },
  {
    label: "第三人称视角",
    value: "第三人称视角"
  },
  {
    label: "细节镜头(ECU)",
    value: "细节镜头(ECU)"
  },
  {
    label: "三点透视",
    value: "三点透视"
  },
  {
    label: "超广角镜头",
    value: "超广角镜头"
  },
  {
    label: "对称构图",
    value: "对称构图"
  },
  {
    label: "三分法构图",
    value: "三分法构图"
  },
  {
    label: "电影镜头",
    value: "电影镜头"
  },
  {
    label: "S 型构图",
    value: "S 型构图"
  },
  {
    label: "水平构图",
    value: "水平构图"
  },
  {
    label: "对角线构图",
    value: "对角线构图"
  },
  {
    label: "底视图",
    value: "底视图"
  },
  {
    label: "仰视",
    value: "仰视"
  }
]

export const moodOptions: VocabularyOptionsProps[] = [
  {
    label: "暗黑",
    value: "暗黑"
  },
  {
    label: "厌恶",
    value: "厌恶"
  },
  {
    label: "残酷，破碎",
    value: "残酷，破碎"
  },
  {
    label: "强烈对比",
    value: "强烈对比"
  },
  {
    label: "充满希望",
    value: "充满希望"
  },
  {
    label: "焦虑",
    value: "焦虑"
  },
  {
    label: "沮丧",
    value: "沮丧"
  },
  {
    label: "高兴",
    value: "高兴"
  },
  {
    label: "难过",
    value: "难过"
  },
  {
    label: "令人恐惧",
    value: "令人恐惧"
  },
  {
    label: "令人憎恨",
    value: "令人憎恨"
  },
  {
    label: "兴奋",
    value: "兴奋"
  },
  {
    label: "生气",
    value: "生气"
  },
  {
    label: "害怕",
    value: "害怕"
  }
]

export const tingeOptions: VocabularyOptionsProps[] = [
  {
    label: "霓虹色调",
    value: "霓虹色调"
  },
  {
    label: "淡色调",
    value: "淡色调"
  },
  {
    label: "单色调",
    value: "单色调"
  },
  {
    label: "金银色调",
    value: "金银色调"
  },
  {
    label: "白粉红色调",
    value: "白粉红色调"
  },
  {
    label: "黄黑色调",
    value: "黄黑色调"
  },
  {
    label: "红黑色调",
    value: "红黑色调"
  },
  {
    label: "黑白色调",
    value: "黑白色调"
  },
  {
    label: "多色彩搭配",
    value: "多色彩搭配"
  },
  {
    label: "多彩的色调",
    value: "多彩的色调"
  },
  {
    label: "低纯度色调",
    value: "低纯度色调"
  },
  {
    label: "高纯度色调",
    value: "高纯度色调"
  },
  {
    label: "黑色背景为中心",
    value: "黑色背景为中心"
  },
  {
    label: "高对比度",
    value: "高对比度"
  }
]

export const selectValueOptions: VocabularyOptionsProps[] = [
  {
    label: "medium",
    value: "媒介",
    options: mediumOptions
  },
  {
    label: "scene",
    value: "场景",
    options: sceneOptions
  },
  {
    label: "hv",
    value: "光照",
    options: hvOptions
  },
  {
    label: "constructs",
    value: "构图",
    options: constructsOptions
  },
  {
    label: "mood",
    value: "情绪",
    options: moodOptions
  },
  {
    label: "tinge",
    value: "色调",
    options: tingeOptions
  }
]

export async function getImages() {
  const list = []
  const files = import.meta.glob("@/assets/media/*.png")
  for (const key in files) {
    const filename = key.replace(/(\.\/filename\/\.(png))/g, "")
    const match = filename.match(/\/([^\/]+)\.[a-zA-Z]+$/)
    const name = match && match[1]
    const path = await files[key]()
    list.push({
      // @ts-ignore
      path: path.default,
      name
    })
  }
  return list
}

export const DownImageList: { id: number; path: string; title: string }[] = [
  {
    id: 1,
    path: DownloadPng,
    title: "下载"
  },
  {
    id: 99,
    path: SubmitPng,
    title: "发布"
  },
  {
    id: 2,
    path: UpPng,
    title: "查看原图"
  },
  {
    id: 3,
    path: DelPng,
    title: "删除"
  }
]

export const modelList: { model: ModelType; name: string }[] = [
  {
    model: "base",
    name: "通用模型"
  },
  {
    model: "cartoon",
    name: "动漫模型"
  }
]
